import service from './method'
//声明一个基础接口变量

//根据自身需求
const _service = {
  getList(data: any) {
    const url = '/api/list'
    return service.get(url, data)
  },
  getDetail(data: any) {
    const url = '/api/detail'
    return service.get(url, data)
  },
  createItem(data: any) {
    const url = '/api/add'
    return service.put(url, data)
  },
  updateItem(data: any) {
    const url = '/api/update'
    return service.post(url, data)
  },
  deleteItem(data: any) {
    const url = '/api/delete'
    return service.delete(url, data)
  }
}

//导出
export default _service
